/* 正在生长的蔬菜页面样式 - 现代化设计 */

/* 页面头部样式 - iPhone 12 Pro优化 */
.page-header {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-main {
    flex: 1;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 var(--spacing-xs) 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

.header-decoration {
    flex-shrink: 0;
    margin-left: var(--spacing-md);
}

.decoration-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: bounce 2s infinite;
    backdrop-filter: blur(10px);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-icon-text {
    line-height: 1;
}

/* 统计概览样式 - iPhone 12 Pro优化 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.stats-row {
    display: contents;
}

.stat-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xs);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-card.primary {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.05));
    border-color: var(--primary-color);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-icon {
    font-size: 16px;
    margin-bottom: 2px;
    display: block;
}

.stat-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
    line-height: 1;
}

.stat-label {
    font-size: 9px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 空白状态样式 */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.6;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.recommendation-tags {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.recommendation-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: var(--border-radius-xl);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* 筛选和排序区域 - iPhone 12 Pro优化 */
.filter-section {
    margin-bottom: var(--spacing-lg);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-label,
.sort-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.filter-select,
.sort-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* 植物容器 - iPhone 12 Pro优化 */
.plants-container {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: 1fr;
}

/* 植物卡片样式 */
.plant-card {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.plant-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.plant-card:hover::before {
    transform: scaleX(1);
}

.plant-card.ready {
    border-color: #f39c12;
}

.plant-card.ready::before {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.plant-card.harvested {
    opacity: 0.7;
    border-color: #95a5a6;
}

.plant-card.harvested::before {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

/* 植物卡片头部 */
.plant-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
}

.plant-icon-container {
    position: relative;
    flex-shrink: 0;
}

.plant-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(46, 204, 113, 0.2);
    transition: all 0.3s ease;
}

.plant-card:hover .plant-icon {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.plant-status-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.plant-status-badge.发芽 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.plant-status-badge.幼苗 {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.plant-status-badge.成长 {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
}

.plant-status-badge.成熟 {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
}

.plant-status-badge.可收获 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.plant-info {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.plant-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.2;
}

.plant-variety {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
    font-weight: 500;
}

.plant-actions {
    flex-shrink: 0;
    padding-top: 2px;
}

/* 植物卡片主体 */
.plant-card-body {
    margin-bottom: var(--spacing-sm);
}

/* 生长进度部分 */
.growth-progress-section {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(46, 204, 113, 0.03);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.progress-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-percentage {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
}

.progress-bar {
    height: 8px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: var(--border-radius-sm);
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 快速信息 */
.quick-info {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.quick-info-item {
    flex: 1;
    text-align: center;
    padding: var(--spacing-xs);
    background: rgba(46, 204, 113, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.quick-info-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
}

.quick-info-value {
    display: block;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
}

.click-hint {
    text-align: center;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-xs);
    background: rgba(46, 204, 113, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px dashed rgba(46, 204, 113, 0.2);
}

.hint-text {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* 信息网格 */
.plant-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(248, 249, 250, 0.5);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.2);
    transform: translateY(-1px);
}

.info-icon {
    font-size: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 204, 113, 0.1);
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.2;
}

.info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 状态徽章 */
.harvested-badge,
.ready-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
    transition: all 0.2s ease;
}

.ready-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.ready-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.harvested-badge {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.harvested-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

/* 植物详情模态框样式 - 底部弹出 */
.plant-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.plant-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plant-detail-modal.active .modal-backdrop {
    opacity: 1;
}

.modal-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-background);
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.plant-detail-modal.active .modal-container {
    transform: translateY(0);
}

.modal-content {
    padding: 0;
}

/* 模态框头部 */
.modal-header {
    position: sticky;
    top: 0;
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    border-radius: 24px 24px 0 0;
    z-index: 10;
}

.plant-header-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.plant-icon-large {
    font-size: 48px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(46, 204, 113, 0.2);
    flex-shrink: 0;
}

.plant-header-text {
    flex: 1;
    min-width: 0;
}

.modal-plant-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.2;
}

.modal-plant-variety {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.modal-close-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.close-icon {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 模态框主体 */
.modal-body {
    padding: var(--spacing-lg);
}

/* 植物状态部分 */
.plant-status-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(39, 174, 96, 0.05));
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.growth-days {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 详细信息网格 */
.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.detail-info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.detail-info-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.detail-info-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.1));
    border-radius: var(--border-radius-md);
    flex-shrink: 0;
}

.detail-info-content {
    flex: 1;
    min-width: 0;
}

.detail-info-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.2;
}

.detail-info-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 模态框进度部分 */
.modal-progress-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: rgba(46, 204, 113, 0.03);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

/* 模态框操作按钮 */
.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.modal-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.modal-actions .btn-secondary {
    background: var(--card-background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-icon {
    font-size: 18px;
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}


/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plant-card {
    animation: slideInUp 0.3s ease forwards;
}

.plant-card:nth-child(1) { animation-delay: 0.1s; }
.plant-card:nth-child(2) { animation-delay: 0.2s; }
.plant-card:nth-child(3) { animation-delay: 0.3s; }
.plant-card:nth-child(4) { animation-delay: 0.4s; }
.plant-card:nth-child(5) { animation-delay: 0.5s; }
.plant-card:nth-child(6) { animation-delay: 0.6s; }

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: var(--spacing-sm);
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
